﻿@model VietPremier.Models.GetTravelHotelModel
@using VietPremier.Repository
@{
    if (Model != null)
    {
        ViewBag.Title = Model.travelCity.Titletag;
        ViewBag.Description = Model.travelCity.Meta_description;
        ViewBag.Keywords = Model.travelCity.Meta_keyword;
    }
}
<div class="row-fluid">
    <div class="span3">
        @Html.Partial("_Maps")
        <!--/ .box-->
        @Html.Action("Onlinesupport", "Home")
        @*@Html.Action("Spotlight", "Home")*@
        @Html.Action("News_Event", "Home")
    </div>
    <!--/ .span3-->
    <div class="span9">
        <div class="link-page">
            <a href="@Url.Action("Index","Home")">Trang chủ&nbsp;<img src="../../Content/cssFrontEnd/images/iconmt.png">&nbsp;</a>
            <a href="@Url.Action("Information","TravelInformation")">Sản phẩm du lịch&nbsp;<img src="../../Content/cssFrontEnd/images/iconmt.png">&nbsp;</a>
            @if (Model != null)
            {
                @*<a href="@Url.Action("Product", "TravelInformation", new { title = Utilities.Encode(@Model.travelProduct.Name) })">@Model.travelProduct.Name&nbsp;<img src="../../Content/cssFrontEnd/images/iconmt.png">&nbsp;</a>*@
                <span>Khách sạn và khu resort</span>
            }
        </div>
        <div class="box-about">
            @if (Model.listTravelHotel.Count > 0)
            {
                <h5>Khách sạn và khu resort của các tour du lịch</h5>
                <div class="row-fluid">
                    @{
                int count = Model.listTravelHotel.Count;
                        <div class="span6 wheretosay">
                            @for (int i = 0; i < (count % 2 == 0 ? count / 2 : count / 2 + 1); i++)
                            {
                                var imageFile = string.Concat("~/Content/upload/travelhotels/", Model.listTravelHotel[2 * i].Image);                
                                <div class="it">
                                    <div class="img">
                                        <div class="img-inner">
                                            <a href="#">
                                                <img src="@Url.Content(imageFile)" style="width:100px; height:100px"  /></a>
                                        </div>
                                    </div>
                                    <h4><a class="title" href="#">@Model.listTravelHotel[2 * i].Name</a></h4>
                                    <i class="">@Model.listTravelHotel[2 * i].Rate</i>
                                    <small class="tripcode">Địa chỉ: @Model.listTravelHotel[2 * i].Address</small>
                                    <small class="tripcode">Số điện thoại: @Model.listTravelHotel[2 * i].Phone</small>
                                    <small class="tripcode">@Model.listTravelHotel[2 * i].Comment</small>
                                </div>
                            }
                        </div>
                        <!--/ .span6 wheretosay-->
                        <div class="span6 wheretosay">
                            @for (int i = 0; i < (count % 2 == 0 ? count / 2 : count / 2 + 1); i++)
                            {
                                if (2 * i + 1 < count)
                                {
                                    var imageFile = string.Concat("~/Content/upload/travelhotels/", Model.listTravelHotel[2 * i + 1].Image);
                                <div class="it">
                                    <div class="img">
                                        <div class="img-inner">
                                            <a href="#">
                                                <img src="@Url.Content(imageFile)" style="width:100px; height:100px"  /></a>
                                        </div>
                                    </div>
                                    <h4><a class="title" href="#">@Model.listTravelHotel[2 * i + 1].Name</a></h4>
                                    <i class="">@Model.listTravelHotel[2 * i].Rate</i>
                                    <small class="tripcode">Địa chỉ: @Model.listTravelHotel[2 * i + 1].Address</small>
                                    <small class="tripcode">Số điện thoại: @Model.listTravelHotel[2 * i + 1].Phone</small>
                                    <small class="tripcode">@Model.listTravelHotel[2 * i + 1].Comment</small>
                                </div>
                                }
                            }
                        </div><!--/ .span6 wheretosay-->
                    }
                    <div class="pagination pagination-centered">
                        <ul>
                            @if (Model.PagingInfo.TotalPages > 1)
                            {
                                @Html.PageLinks(Model.PagingInfo, x => Url.Action("Hotel", new { title = Utilities.Encode(Model.travelCity.Name), page = x }))    
                            }
                        </ul>
                    </div>
                </div><!--/ .box-about-->
            }else{
                <h5>This page is updated content</h5>
            }
        </div>
    </div>
</div><!--/ .row-fluid-->
